//
//  YTExpertModel.m
//  YuTang
//
//  Created by 葛悦彣 on 2024/11/20.
//

#import "YTExpertModel.h"

@implementation YTExpertModel
+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID":@[@"id"],
             @"imgUrl":@[@"imgUrl",@"coverImageUrl"],
    };
}
-(void)setSpeciality:(NSString *)speciality{
    _speciality = [NSString stringWithFormat:@"擅长:%@",speciality];
}
- (CGFloat)institutionH{
    if(_institutionH == 0){
        _institutionH = [DTKTool textWithtitle:self.institution andSize:CGSizeMake(kwt(265), 10000) andFout:kFont(16)].height;
        if(_institutionH < kwt(16)){
            _institutionH = kwt(16);
        }
    }
    return _institutionH;
}
- (CGFloat)specialityH{
    if(_specialityH == 0){
        _specialityH = [DTKTool textWithtitle:self.speciality andSize:CGSizeMake(kwt(265), 10000) andFout:kFont(16)].height;
        if(_specialityH < kwt(16)){
            _specialityH = kwt(16);
        }
    }
    return _specialityH;
}

-(CGFloat)CellH{
    return kwt(124) + self.specialityH + self.institutionH;
}
@end
